<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:s="http://jboss.com/products/seam/taglib"
	xmlns:a="http://richfaces.org/a4j"
	xmlns:rich="http://richfaces.org/rich"
	xmlns:ctg="http://www.crotouristguide.com/taglib"
	xmlns:c="http://java.sun.com/jstl/core">

<ui:component>
	<rich:panel styleClass="blue-panel"
		rendered="#{objektDetails.oglasivac != null and objektDetails.oglasivac.containRola(3)}">
		<s:div styleClass="title">
			<h2><h:outputText value="#{messages['label.advertiser']}" /></h2>
		</s:div>
		<h:panelGrid columns="2">
			<h:outputLabel value="#{messages['label.name']}:" />
			<h:outputText
				value="#{objektDetails.oglasivac.ime} #{objektDetails.oglasivac.prezime}" />
			<h:outputLabel value="#{messages['label.adresa']}"
				rendered="#{objektDetails.oglasivac.adresa != null}" />
			<h:outputText value="#{objektDetails.oglasivac.adresa}"
				rendered="#{objektDetails.oglasivac.adresa != null}" />
			<h:outputLabel value="#{messages['label.place']}:"
				rendered="#{objektDetails.oglasivac.mjesto != null}" />
			<h:outputText
				value="#{objektDetails.oglasivac.postanskiBroj} #{objektDetails.oglasivac.mjesto}" />
			<h:outputLabel value="#{messages['label.kontakt_ime']}"
				rendered="#{objektDetails.oglasivac.kontaktIme != null}" />
			<h:outputText value="#{objektDetails.oglasivac.kontaktIme}"
				rendered="#{objektDetails.oglasivac.kontaktIme != null}" />
			<h:outputLabel value="#{messages['label.phone']}"
				rendered="#{objektDetails.oglasivac.telefon != null}" />
			<h:outputText value="#{objektDetails.oglasivac.telefon}"
				rendered="#{objektDetails.oglasivac.telefon != null}" />
			<h:outputLabel value="#{messages['label.mob_telefon']}"
				rendered="#{objektDetails.oglasivac.mobTelefon != null}" />
			<h:outputText value="#{objektDetails.oglasivac.mobTelefon}"
				rendered="#{objektDetails.oglasivac.mobTelefon != null}" />
		</h:panelGrid>
		<h:panelGrid columns="2">
			<h:outputLabel value="#{messages['label.email']}"
				rendered="#{objektDetails.oglasivac.email != null}" />
			<h:outputLink value="#"
				onclick="#{rich:component('informationalPanel')}.show();return false;">
				<h:outputText value="#{objektDetails.oglasivac.email}"
					rendered="#{objektDetails.oglasivac.email != null}" />
			</h:outputLink>
			<h:outputLabel value="#{messages['label.www']}"
				rendered="#{objektDetails.oglasivac.www != null}" />
			<h:outputLink
				value="#{objektDetails.oglasivac.www.contains('http') ? '' : 'http://'}#{objektDetails.oglasivac.www}"
				target="_blank" rendered="#{objektDetails.oglasivac.www != null}">
				<h:outputText
					value="#{stringUtil.substring(objektDetails.oglasivac.www,30)}" />
			</h:outputLink>
		</h:panelGrid>
		<br />
		<h:outputLink
			value="#{application.contextPath}/guides/objekti/list.seam">
			<f:param name="sp"
				value="idAutora_#{objektDetails.oglasivac.idKorisnika}" />
			<f:param name="l" value="#{currentLang}" />
			<h:outputText value="#{messages['label.show.all.advertiser.ads']}" />
		</h:outputLink>
		<f:subview rendered="#{objektDetails.oglasivac.logo != null}">
			<br />
			<s:graphicImage value="#{objektDetails.oglasivac.logo}"
				alt="#{messages['label.image.alt']}">
				<s:transformImageSize width="200" height="120" maintainRatio="false" />
			</s:graphicImage>
		</f:subview>
	</rich:panel>
</ui:component>

</html>